#include "StdAfx.h"
#include "Renderable.h"

VAMPIRE_NAMESPACE_BEGIN

Material* Renderable::getMaterial() const
{
	return mMaterial;
}

void Renderable::setMaterial( Material* material )
{
	if (mMaterial)
	{
		mMaterial->removeRenderableFromQueue(this);
	}
	mMaterial = material;
	mMaterial->addRenderableToQueue(this);
}

VAMPIRE_NAMESPACE_END
